package cn.wolfcode.luowowo.member.service;

import cn.wolfcode.luowowo.common.exception.LogicException;
import cn.wolfcode.luowowo.member.domain.UserInfo;

import java.util.List;

/**
 * 用户服务接口
 */
public interface IUserInfoService {
    /**
     * 查询单个
     * @param id
     * @return
     */
    UserInfo get (Long id);

    /**
     * 验证手机号
     * @param phone
     * @return
     */
    boolean checkPhone(String phone);

    /**
     * 发送验证码
     * @param phone
     */
    void sendVerifyCode(String phone)throws LogicException;

    void userRegist(String phone, String nickname, String password, String rpassword, String verifyCode) throws LogicException;

    String userLogin(String username, String password) throws LogicException;

    /**
     * 所有用户查询
     * @return
     */
    List<UserInfo> list();
}
